import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

const ApiList = resolve => require(['../pages/apiList/apiList.vue'], resolve);
const ProjectList = resolve => require(['../pages/projectList/projectList.vue'], resolve);
const ProjectEdit = resolve => require(['../pages/projectEdit/projectEdit.vue'], resolve);

const appRouter = new Router({
    mode: 'history',
    routes: [
        {
            path: '/projectList',
            alias: '/',
            name: 'projectList',
            component: ProjectList,
        },
        {
            path: '/projectEdit',
            name: 'projectEdit',
            component: ProjectEdit,
        },
        {
            path: '/apiList',
            name: 'apiList',
            component: ApiList,
        }
    ]
});

export default appRouter;
